<?php

/**
 * EventoCalendario form base class.
 *
 * @method EventoCalendario getObject() Returns the current form's model object
 *
 * @package    sibi-salud
 * @subpackage form
 * @author     SIBI <sibiud@gmail.com>
 */
abstract class BaseEventoCalendarioForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'           => new sfWidgetFormInputHidden(),
      'lugar'        => new sfWidgetFormInputText(),
      'nombre'       => new sfWidgetFormInputText(),
      'descripcion'  => new sfWidgetFormTextarea(),
      'fecha_inicio' => new sfWidgetFormDateTime(),
      'fecha_fin'    => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'           => new sfValidatorPropelChoice(array('model' => 'EventoCalendario', 'column' => 'id', 'required' => false)),
      'lugar'        => new sfValidatorString(array('max_length' => 255)),
      'nombre'       => new sfValidatorString(array('max_length' => 255)),
      'descripcion'  => new sfValidatorString(array('required' => false)),
      'fecha_inicio' => new sfValidatorDateTime(),
      'fecha_fin'    => new sfValidatorDateTime(),
    ));

    $this->widgetSchema->setNameFormat('evento_calendario[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'EventoCalendario';
  }


}
